package serialize;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.time.LocalDate;

public class SerializationTest3 {

	public static void main(String[] args) throws IOException {
		
		Human h = new Human( 8526 ,  "秋香" , '女', LocalDate.of( 1998 , 10 , 25 ) );
		
		File f = new File( "human.ser" );
		OutputStream out = new FileOutputStream( f );
		ObjectOutput oo = new ObjectOutputStream(out);
		
		oo.writeObject( h );
		
		oo.close();
		out.close();
	}

}
